#packages used
library(haven)
library(tidyverse)
library(zoo)
#Convenience functions
numextract <- function(string){
as.numeric(str_extract(string, "\\-*\\d+\\.*\\d*"))
}
comma <- function(x) format(x, digits = 3, big.mark = ",")
comma_2 <- function(x) format(x, digits = 2, big.mark = ",")
This script creates a long form longitudinal dataset which tracks heart transplant candidates (identified by the PX_ID variable) from the time of initial listing until death. It requires the following SRTR Standard Analysis Files (SAF) data files as inputs (SAS format)
The script also creates the first paragraph of the results section as well as all the numbers for Figure 1.
Our project used the quarter 3 2018 SAF:
# read in the SRTR SAF files
cand_thor <- read_sas("SAF 2018 Q3/cand_thor.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
tx_hr <- read_sas("SAF 2018 Q3/tx_hr.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
stathist_thor <- read_sas("SAF 2018 Q3/stathist_thor.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
statjust_hr1a <- read_sas("SAF 2018 Q3/statjust_hr1a.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
statjust_hr1b <- read_sas("SAF 2018 Q3/statjust_hr1b.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
donor_deceased <- read_sas("SAF 2018 Q3/donor_deceased.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
institution <- read_sas("SAF 2018 Q3/institution.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
Set data range and exclusion criteria
start_year <- 2006
end_year <- 2015
min_tx <- 11 #minimum transplants in entire study period
multi <- FALSE #exclude multi-organ recipients
peds <- FALSE # exclude candidates < 18 at the time of listing
outfile <- paste0("clean_time_series_revise", start_year, "_", end_year, ".csv")
Filter candidate dataset
init_list <- cand_thor %>%
mutate(list_date = CAN_LISTING_DT, dead_date = PERS_OPTN_DEATH_DT, rem_dt = CAN_REM_DT) %>%
mutate(list_year = format(list_date, "%Y")) %>%
filter(list_year>=start_year & list_year <=end_year & WL_ORG == "HR") %>%
mutate(status = CAN_INIT_STAT,
OPO = CAN_LISTING_OPO_ID,
date_start = list_date)
#remove peds
if (peds == FALSE){
init_list <- init_list %>% filter(CAN_AGE_AT_LISTING >17)
tot_adults <- nrow(init_list)
}
#remove multiorgan recipients
if (multi == FALSE){
multi_recips <- tx_hr %>% filter(REC_TX_TY == 2 | REC_TX_TY ==4) %>% select(PX_ID,REC_TX_TY)
n_mults <- nrow(init_list %>% filter(PX_ID %in% multi_recips$PX_ID))
init_list <- init_list %>% filter(!PX_ID %in% multi_recips$PX_ID)
remove(multi_recips)
}
#remove candidates listed at low volume centers
init_list <- init_list %>%
mutate(transplant = ifelse(CAN_REM_CD == 4, 1, 0)) %>%
group_by(CAN_LISTING_CTR_ID) %>%
mutate(tot_tx = sum(transplant, na.rm = TRUE)) %>% ungroup()
num_all_centers <- length(unique(init_list$CAN_LISTING_CTR_ID))
removed_low_tx <- nrow(init_list %>% filter(tot_tx< min_tx))
init_list <- init_list %>% filter(tot_tx>=min_tx)
#number of low volume centers
num_low_vol_centers <- num_all_centers - length(unique(init_list$CAN_LISTING_CTR_ID))
Identify last observation date for each candidate
#link to transplant record and
#identify identify last observation date (death, re-transplant, or last follow-up)
init_list <-
init_list %>% left_join(tx_hr %>% select(PX_ID, TFL_LASTATUS, TFL_DEATH_DT, TFL_LAFUDATE),
by = "PX_ID") %>%
mutate(
to_die = case_when(
CAN_REM_CD %in% c(8, 21)==TRUE ~ 1 ,
TFL_LASTATUS %in% c("D", "R") ==TRUE ~1,
is.na(PERS_OPTN_DEATH_DT) == FALSE ~ 1,
is.na(PERS_SSA_DEATH_DT) == FALSE ~ 1,
TRUE ~0
),
tfl_date = TFL_LAFUDATE,
dead_date = case_when(
is.na(PERS_OPTN_DEATH_DT) == FALSE ~ PERS_OPTN_DEATH_DT,
TRUE ~ PERS_SSA_DEATH_DT),
rem_dt = CAN_REM_DT,
final_dt = case_when(
is.na(dead_date) == FALSE ~ dead_date,
is.na(tfl_date) == FALSE ~ tfl_date,
TRUE ~ rem_dt)
)
#preview data
init_list %>%
select(PX_ID, to_die, list_date, final_dt, CAN_REM_CD,
rem_dt, REC_TX_DT, TFL_LASTATUS, tfl_date,
PERS_OPTN_DEATH_DT, PERS_SSA_DEATH_DT, dead_date) %>%
arrange(list_date)
Candidate covariates required to assign initial listing status under the three-status system and the six-status system. Additional covariates for revision include Age, gender, BMI, Blood type, Cardiac Diagnosis, and sensitization
init_list <- init_list %>%
select(PX_ID, OPO, CAN_LISTING_CTR_ID, status,
date_start, list_year, list_date, dead_date, final_dt, to_die,
CAN_DGN,
CAN_REM_CD, PERS_OPTN_DEATH_DT, PERS_SSA_DEATH_DT,
CAN_INIT_STAT,
CAN_VAD_TY, CAN_VAD1, CAN_VAD2, CAN_IV_INOTROP,
CAN_IABP, CAN_ECMO, CAN_TAH,
CAN_CARDIAC_OUTPUT, CAN_CARDIAC_OUTPUT_MEDS,
CAN_HGT_CM, CAN_WGT_KG,
CAN_PCW_MEAN, CAN_PCW_MEAN_MEDS,
CAN_AGE_AT_LISTING, CAN_GENDER, CAN_BMI, CAN_ABO, CAN_DGN,
CAN_PRELIM_XMATCH_REQUEST
) %>%
mutate(age = CAN_AGE_AT_LISTING,
female = ifelse(CAN_GENDER == "F", 1, 0),
bmi_low = case_when(
CAN_BMI < quantile(init_list$CAN_BMI, probs = c(0.25, 0.75), na.rm = TRUE)[[1]] ~ 1,
is.na(CAN_BMI) == FALSE ~ 0
),
bmi_high = case_when(
CAN_BMI > quantile(init_list$CAN_BMI, probs = c(0.25, 0.75), na.rm = TRUE)[[2]] ~ 1,
is.na(CAN_BMI) == FALSE ~ 0
),
blood_type = factor(
case_when(
CAN_ABO %in% c("A", "A1", "A2") ~ "A",
CAN_ABO %in% c("A1B", "A2B") ~ "AB",
TRUE ~ CAN_ABO)
),
simple_diag = case_when(
CAN_DGN>999 & CAN_DGN<1007 ~ "Dilated cardiomyopathy, non-ischemic",
CAN_DGN == 1007 | CAN_DGN ==1200 ~ "Ischemic cardiomyopathy",
CAN_DGN>1048 & CAN_DGN< 1100 ~ "Restrictive cardiomyopathy",
TRUE ~ "Other"
),
simple_diag = factor(simple_diag,
levels = c("Dilated cardiomyopathy, non-ischemic",
"Ischemic cardiomyopathy",
"Restrictive cardiomyopathy",
"Other")),
cross_match = ifelse(CAN_PRELIM_XMATCH_REQUEST == "Y", 1, 0)
)
table(init_list$blood_type)
A AB B O
11258 1368 4029 13074
remove(cand_thor)
#Select Transplant Recipient and Donor Covariates Keep transplant and Donor variables used in donor risk index score * Donor Age * Donor BUN/Cr * Ischemic time * Race Mismatch
And other recipient covariates to generate table S4 in the supplement (comparison of recipient characteristics at high and low benefit centers)
tx <- tx_hr %>% filter(PX_ID %in% init_list$PX_ID) %>%
mutate(tx_date= REC_TX_DT,
tfl_date = TFL_LAFUDATE,
status = CAN_LAST_STAT) %>%
arrange(PX_ID, tx_date)
tx <- tx %>% select(PX_ID, REC_OPO_ID, REC_CTR_ID, DONOR_ID, status, tx_date, CAN_RACE,
CAN_DIAB_TY, CAN_DIAB,
REC_CREAT, REC_DIAL,
REC_DGN,
REC_CARDIAC_SURG,
REC_VAD_TY, REC_VAD1, REC_VAD2, REC_INOTROP,
REC_IABP, REC_ECMO,
REC_IMPLANT_DEFIB,
REC_BMI,
REC_FUNCTN_STAT,
REC_CARDIAC_OUTPUT, REC_CARDIAC_OUTPUT_MEDS, REC_HGT_CM, REC_WGT_KG,
REC_PCW_MEAN, REC_PCW_MEAN_MEDS,
REC_PULM_ART_MEAN, REC_PULM_ART_MEAN_MEDS,
REC_HR_ISCH,
TFL_LASTATUS, TFL_LAFUDATE
)
donos <- donor_deceased %>% filter(DONOR_ID %in% tx$DONOR_ID) %>%
mutate(DON_BUN = as.integer(DON_BUN),
DON_CREAT = as.integer(DON_CREAT))
donos <- donos %>% select(DONOR_ID, DON_OPO_CTR_ID,
DON_AGE,
DON_RACE,
DON_CREAT, DON_BUN
)
tx <- left_join(tx, donos, by = "DONOR_ID")
tx <- tx %>% mutate(
white_recip = ifelse(CAN_RACE == 8,1,0),
white_donor = ifelse(DON_RACE == 8,1,0),
simple_race = case_when(
CAN_RACE == 8 ~ "White",
CAN_RACE == 16 ~ "Black",
CAN_RACE == 2000 ~ "Hispanic",
CAN_RACE == 64 ~ "Asian",
TRUE ~ "Other"),
simple_don_race = case_when(
DON_RACE == 8 ~ "White",
DON_RACE == 16 ~ "Black",
DON_RACE == 2000 ~ "Hispanic",
DON_RACE == 64 ~ "Asian",
TRUE ~ "Other"),
black = ifelse(simple_race == "Black", 1, 0),
black_don = ifelse(simple_don_race == "Black", 1, 0),
drs = case_when(
REC_HR_ISCH/60 < 2 ~ 1,
REC_HR_ISCH/60 >= 2 & REC_HR_ISCH/60 < 4 ~ 2,
REC_HR_ISCH/60 >=4 & REC_HR_ISCH/60 < 6 ~ 3,
REC_HR_ISCH/60 >= 6 & REC_HR_ISCH/60 < 8 ~4,
TRUE ~ 5
)+
case_when(
DON_AGE >=40 & DON_AGE <50 ~ 3,
DON_AGE >= 50 ~ 5,
TRUE ~ 0
) +
case_when(
(DON_BUN/DON_CREAT) > 30 ~ 3,
TRUE ~ 0
) +
case_when(
black != black_don ~ 2,
TRUE ~ 0
)
)
#identify "overtreated" recipients based on recipient hemodynamics.
tx <- tx %>% mutate(
bsa = 0.007184*(REC_HGT_CM)^(0.725)*REC_WGT_KG^(0.425),
recip_pcwp = as.numeric(REC_PCW_MEAN),
recip_ci = REC_CARDIAC_OUTPUT/bsa,
iabp_rec_no_shock = case_when(
recip_pcwp < 15 & REC_IABP ==1 ~ 1,
recip_ci > 1.8 & REC_CARDIAC_OUTPUT_MEDS == "N" & REC_IABP ==1 ~ 1,
recip_ci > 2.0 & REC_IABP ==1 ~ 1
),
recip_overtreat = case_when(
recip_pcwp < 15 & REC_INOTROP ==1 & REC_VAD_TY == 1 ~ 1,
recip_ci > 1.8 & REC_CARDIAC_OUTPUT_MEDS == "N" & REC_INOTROP ==1 & REC_VAD_TY == 1 ~ 1,
recip_ci > 2.2 & REC_INOTROP ==1 & REC_VAD_TY == 1~ 1,
recip_pcwp < 15 & REC_IABP ==1 & REC_VAD_TY == 1 ~ 1,
recip_ci > 1.8 & REC_CARDIAC_OUTPUT_MEDS == "N" & REC_IABP ==1 & REC_VAD_TY == 1~ 1,
recip_ci > 2.0 & REC_IABP ==1 & REC_VAD_TY == 1~ 1
)
)
#remove the race variable to avoid redundancy
tx <- tx %>% select(-CAN_RACE)
remove(tx_hr, donor_deceased, donos)
#preview transplant recipient dataset
tx
Filter status history file and select key variables
hist <- stathist_thor %>% filter(PX_ID %in% init_list$PX_ID) %>%
mutate(date_start = CANHX_BEGIN_DT,
date_end = CANHX_END_DT,
status = CANHX_STAT_CD,
real_status = CANHX_STAT_CD,
rem_dt = CAN_REM_DT) %>%
arrange(PX_ID, date_start) %>%
select(PX_ID, status, real_status, date_start, date_end, rem_dt, CAN_REM_CD)
hist <- distinct(hist, PX_ID, date_start, .keep_all = TRUE)
remove(stathist_thor)
#preview status history data set
hist
Filter status 1A justification file and select key variables
just_1a <- statjust_hr1a %>%
filter(PX_ID %in% init_list$PX_ID) %>%
mutate(date_start = CANHX_CHG_DT,
status = CANHX_STAT_CD) %>%
arrange(PX_ID, date_start)
#remove redundant or erroneous justifications
just_1a <- distinct(just_1a) %>%
filter(CANHX_FORM_STAT == 4 | CANHX_FORM_STAT == 8) %>%
distinct(PX_ID, date_start, .keep_all = TRUE)
#select key variables
just_1a <- just_1a %>% select(PX_ID, CAN_LISTING_CTR_ID,
status, date_start, CANHX_STAT_TY, CANHX_FORM_STAT,
CANHX_DIALYSIS, CANHX_LAB_SERUM_CREAT,
CANHX_ADULT_CRITERIA_A, CANHX_ADULT_CRITERIA_B,
CANHX_ADULT_CRITERIA_C, CANHX_ADULT_CRITERIA_D,
CANHX_ADULT_CRITERIA_E, CANHX_INTRP_DOBU, CANHX_INTRP_DOPA, CANHX_INTRP_MILRIN,
CANHX_ADMITTED,
CANHX_IABP, CANHX_ECMO, CANHX_LVAD_TYPE, CANHX_VAD, CANHX_TAH, CANHX_RVAD_TYPE,
CANHX_LAB_BILI,
CANHX_CARD_OUTPUT, CANHX_HEMO_CI, CANHX_HEMO_INTRP_OBTAINED, CANHX_HEMO_BSA,
CANHX_HEMO_PCWP,
CANHX_HEMO_MPAP,
CANHX_DEV_MALFUNCTN,
CANHX_DEV_VENT_ARRYTHM
)
remove(statjust_hr1a)
just_1a
Filter status 1B justifcation file and select key variables. These forms have a lot less information, mainly just report VAD vs. inotropes
just_1b <- statjust_hr1b %>% filter(PX_ID %in% init_list$PX_ID) %>%
mutate(date_start = CANHX_CHG_DT,
status = CANHX_STAT_CD,
stable_lvad = CANHX_VAD,
except_1b =CANHX_CRIT_NOT_MET,
low_dose_ino = pmax(CANHX_REQUIRE_LOW_INOTROP, CANHX_CONT_IV_INOTROP)
) %>%
arrange(PX_ID, date_start)
just_1b <- distinct(just_1b) %>%
filter(CANHX_FORM_STAT == 4 | CANHX_FORM_STAT == 8) %>%
distinct(PX_ID, date_start, .keep_all = TRUE)
just_1b <- just_1b %>%
select(PX_ID, CAN_LISTING_CTR_ID, status, date_start,
low_dose_ino, stable_lvad, except_1b
)
remove(statjust_hr1b)
just_1b
Merge data sets to create time series
#merge with history
cand_time_series <- init_list %>%
mutate(int_form =1, rem_cd = CAN_REM_CD) %>%
full_join(hist, c("PX_ID", "date_start", "status"), suffix = c(".init", ".hist")) %>%
arrange(PX_ID, date_start)
#merge with 1A justifications, keeping justification forms in the middle of a history period
cand_time_series <- cand_time_series %>%
full_join(just_1a, by = c("PX_ID", "date_start", "status"), suffix = c(".init", ".j1a")) %>%
arrange(PX_ID, date_start)
#merge with 1B justiciations, keeping justification forms in the middle of a history period
cand_time_series <- cand_time_series %>%
full_join(just_1b, by = c("PX_ID", "date_start", "status"), suffix = c(".init", ".j1b")) %>%
arrange(PX_ID, date_start)
#carryforward "real status" status history dataset
cand_time_series <- cand_time_series %>% arrange(PX_ID, date_start) %>%
group_by(PX_ID) %>%
mutate(real_status = na.locf(real_status, na.rm = FALSE)) %>%
ungroup()
#remove justification forms that didn't actually change offical status
cand_time_series <- cand_time_series %>%
filter(real_status == status | int_form ==1)
Add transplant files to time series
cand_time_series <- cand_time_series %>%
mutate(date = date_start)
tx <- tx %>% mutate(date = tx_date)
time_series <- cand_time_series %>%
full_join(tx, by = c("PX_ID", "date", "status"), suffix = c(".cand", ".tx")) %>%
arrange(PX_ID, date)
#verify initial status counts are the same (not run)
# init_list %>% count(status)
# cand_time_series %>% filter(int_form==1) %>% count(status)
#time_series %>% filter(int_form==1) %>% count()
There are a total of 165275 observations in the dataset for 29729 candidates listed during the study period. The post-transplant period is considered one observation.
Convert dates to start/stop time in days variables
#carryforward key dates and death status
ts <- time_series %>% ungroup() %>%
arrange(PX_ID, date) %>%
group_by(PX_ID) %>%
mutate(
tx = if_else(is.na(tx_date)==FALSE, 1, 0),
to_die = na.locf(to_die, na.rm = FALSE),
final_dt = na.locf(final_dt, na.rm = FALSE),
list_date = na.locf(list_date, na.rm = FALSE)
)
#create time (days) variable
ts <- ts %>% group_by(PX_ID) %>% mutate(
t_1 = as.numeric(date-list_date),
last_ob = if_else(row_number()==n(), 1, 0),
t_2 = ifelse(last_ob ==0, lead(t_1), final_dt - list_date)
) %>% ungroup()
# capture transplant procedure deaths
# This captures hyperacute perioperative risk. Also capture one day listings of any type
ts <- ts %>%
mutate( t_2 = ifelse(t_1 == t_2 & tx ==1 & date == final_dt & to_die ==1, t_2 + 1, t_2),
t_2 = ifelse(t_1 == t_2 & list_date == final_dt & int_form ==1, t_2 + 1, t_2))
#filter out one day periods and erroneous datings
#(where listing date is after the death date in social security death master file).
#This erroneous listings are including as in the exclusions in Figure 1)
ts <- ts %>%
filter(t_2 > t_1) %>%
group_by(PX_ID) %>%
mutate(
last_ob = if_else(row_number()==n(), 1, 0),
dead = if_else(last_ob ==1 & to_die ==1, 1, 0)
) %>%
ungroup()
#preview clean time series data
ts %>% select(PX_ID, status,tx, t_1, t_2, dead, date, list_date, final_dt)
#137 date entry errors below
#ts %>% filter(int_form==1) %>% count()
#create center and OPO variables
ts <- ts %>% mutate(
center = case_when(
is.na(CAN_LISTING_CTR_ID.init) == FALSE ~ CAN_LISTING_CTR_ID.init,
is.na(CAN_LISTING_CTR_ID.j1a) == FALSE ~ CAN_LISTING_CTR_ID.j1a,
is.na(REC_CTR_ID) == FALSE ~ REC_CTR_ID
),
center = na.locf(center))
ts <- ts %>% mutate(
OPO = case_when(
is.na(REC_OPO_ID) == FALSE ~ REC_OPO_ID,
TRUE ~ OPO
), OPO = na.locf(OPO))
ts %>% select(PX_ID, center, OPO, status, t_1, t_2, tx, dead)
Generate * stat_just, a variable to that identifies three-status justifications and inactive statuses * three_status, a variable that is missing when inactive and just records active three-status * era_tx (transplant year dichotomized) * tx_risky_don (donor risk score > 5) transplant modifying variables
final <- ts %>%
mutate(
stat_just = case_when(
CANHX_ADULT_CRITERIA_A ==1~ "Status 1A (MCS for shock)",
CANHX_ADULT_CRITERIA_B == 1 ~ "Status 1A (MCS complication)",
CANHX_ADULT_CRITERIA_C == 1 ~ "Status 1A (Mechanical ventilation)",
CANHX_ADULT_CRITERIA_D == 1 ~ "Status 1A (High dose inotropes)",
CANHX_ADULT_CRITERIA_E == 1 ~ "Status 1A (Exception)",
status == 2010 & tx == 0 ~ "Status 1A (no justification listed)",
status == 2010 & tx == 1 & t_1 == 0 ~ "Status 1A (no justification listed)",
status == 2020 & low_dose_ino ==1 ~ "Status 1B (inotropes)",
status == 2020 & stable_lvad ==1 ~ "Status 1B (stable VAD)",
status == 2020 & except_1b ==1 ~ "Status 1B (Exception)",
status == 2020 & tx == 0 ~ "Status 1B (No justification listed)",
status == 2030 ~ "Status 2",
status == 2999 ~ "Inactive"),
tx_year = as.numeric(format(tx_date, "%Y")),
era_tx = ifelse((tx_year<=2010) & tx ==1, 1, 0),
tx_risky_don = if_else(tx ==1 & drs>5, 1, 0),
three_status = case_when(
status == 2010 ~ "Status 1A",
status == 2020 ~ "Status 1B",
status == 2030 ~ "Status 2"
)
)
Identify LVAD complications that are not device malfunctions
final <- final %>% mutate(
lvad_comp = case_when(
CANHX_ADULT_CRITERIA_B ==1 & CANHX_DEV_MALFUNCTN ==1 ~ as.numeric(0),
TRUE ~ as.numeric(CANHX_ADULT_CRITERIA_B)
)
)
Identify LVAD patients listed with Status 1A elective time
##official SRTR list
durable_list <- c(205, 206, 208, 210, 216, 217, 223, 224, 230, 231, 232, 233,
305, 306, 313, 316, 319, 325, 402)
lvad_list <- c(205, 206, 208, 210, 216, 217, 223, 224, 230, 231, 232, 233)
final <- final %>%mutate(
cf_lvad = case_when(
CANHX_LVAD_TYPE %in% lvad_list ~1,
CAN_VAD_TY == 2 & CAN_VAD1 %in% lvad_list ~ 1,
REC_VAD_TY == 2 & REC_VAD1 %in% lvad_list ~ 1,
CANHX_ADULT_CRITERIA_B==1 ~1,
status == 2020 & stable_lvad==1 ~ 1
),
elective_1A = case_when(
CANHX_ADULT_CRITERIA_A ==1 & cf_lvad ==1 & CANHX_IABP ==0 & CANHX_ECMO ==0 ~ 1,
CANHX_ADULT_CRITERIA_B == 1 ~ 0,
CANHX_ADULT_CRITERIA_C == 1 ~ 0,
CANHX_ADULT_CRITERIA_D == 1 ~ 0,
CANHX_ADULT_CRITERIA_E == 1 ~ 0
)
)
Identify time periods when candidate supported with an IABP or multiple inotropes would be downgraded to Status 4 based on cardiac index, pulmonary capillary wedge pressure, or inotrope dose. See supplement for more details
final <- final %>% mutate(
ino_ci = as.numeric(CANHX_HEMO_CI),
ino_pcwp = as.numeric(CANHX_HEMO_PCWP),
n_inos = ifelse(is.na(CANHX_INTRP_DOPA)==FALSE, 1, 0) +
ifelse(is.na(CANHX_INTRP_DOBU)==FALSE, 1, 0) +
ifelse(is.na(CANHX_INTRP_MILRIN)==FALSE, 1, 0),
n_inos = ifelse(status != 2010, NA, n_inos),
multi_ino = ifelse(n_inos > 1, 1, 0),
single_ino = ifelse(n_inos ==1, 1, 0),
low_d_ino = ifelse(n_inos> 1 &
(CANHX_INTRP_DOPA<3 | CANHX_INTRP_MILRIN <0.25 | CANHX_INTRP_DOBU < 3), 1, 0),
low_s_ino = ifelse(n_inos ==1 & (CANHX_INTRP_MILRIN <0.5 | CANHX_INTRP_DOBU < 7.5),1,0),
bsa = 0.007184*(CAN_HGT_CM)^(0.725)*CAN_WGT_KG^(0.425),
tcr_ci = CAN_CARDIAC_OUTPUT/bsa,
iabp_no_shock = case_when(
tcr_ci > 1.8 & CAN_CARDIAC_OUTPUT_MEDS == "N" & (CANHX_IABP==1 | CAN_IABP ==1) ~ 1,
tcr_ci > 2.0 & (CANHX_IABP==1 | CAN_IABP ==1) ~ 1,
is.na(tcr_ci) == FALSE & (CANHX_IABP==1 | CAN_IABP ==1) ~ 0
),
overtreat = case_when(
iabp_rec_no_shock ==1 ~ 1,
recip_overtreat == 1 ~ 1,
CAN_PCW_MEAN < 15 & CAN_IABP ==1 ~ 1,
CANHX_HEMO_PCWP < 15 & CANHX_ADULT_CRITERIA_D ==1 ~ 1,
ino_ci>2.2~ 1,
ino_pcwp <15 ~ 1,
(ino_ci>1.8 & CANHX_HEMO_INTRP_OBTAINED =="N") ~ 1,
low_d_ino == 1 | low_s_ino == 1 ~ 1,
iabp_no_shock == 1 ~ 1,
ino_ci <= 1.8 ~ 0,
(ino_ci <= 2.2 & CANHX_HEMO_INTRP_OBTAINED =="Y") ~ 0,
iabp_no_shock == 0 ~ 0
),
over_1a = ifelse(status == 2020 | status == 2030, 0, overtreat)
)
Code six-status
#non dischargable VADs
non_discharge <- c(201, 203, 204, 209, 215, 218, 221, 222, 225, 226, 227, 228,
234, 301, 302, 303, 309, 310, 311, 320, 321)
#restrictive, amyloid, CHD, and HCOM, cardiomyopathy diagnoses
stat4_diagnoses <- c(1050, 1051, 1052, 1053, 1054, 1099, 1100, 1101, 1102,
1103, 1104, 1105, 1106, 1199, 1200, 1201, 1203, 1205, 1206, 1207, 1208)
final <- final %>% group_by(PX_ID) %>%
mutate(diagnosis = na.locf(CAN_DGN, na.rm = FALSE)) %>%
ungroup()
final <- final %>% mutate(
six_status = case_when(
status == 2020~ 4,
diagnosis %in% stat4_diagnoses & status ==2030 ~ 4,
status == 2030~ 6,
overtreat == 1 ~ 4,
elective_1A ==1 ~ 3,
lvad_comp ==1 ~3,
CAN_ECMO == 1 ~1,
CANHX_ECMO == 1 ~ 1,
REC_ECMO == 1 ~ 1,
CANHX_ADULT_CRITERIA_A ==1 & CANHX_RVAD_TYPE %in% non_discharge ~ 1,
CAN_VAD_TY == 5 & (CAN_VAD1 %in% non_discharge | CAN_VAD2 %in% non_discharge) ~ 1,
REC_VAD_TY == 5 & (REC_VAD1 %in% non_discharge | REC_VAD2 %in% non_discharge) ~ 1,
CANHX_ADULT_CRITERIA_A ==1 ~ 2,
CANHX_DEV_MALFUNCTN ==1 ~ 2,
CANHX_DEV_VENT_ARRYTHM == 1 ~ 2,
status == 2010 & tx ==0 ~ 3
),
over_1a = ifelse(six_status != 4, 0, over_1a),
elective_1A = ifelse(six_status != 3 | status == 2999, 0, elective_1A),
lvad_comp = ifelse(six_status != 3, 0, lvad_comp))
#confirm that the status 2010 patients reassigned to status 4 are all overtreated (not run)
#final %>% filter(six_status ==4 & status ==2010) %>% count(over_1a)
Add LVAD variable
final <- final %>%
mutate(lvad = case_when(
lvad_comp ==1 ~ 1,
elective_1A == 1 ~ 1,
stable_lvad == 1 ~ 1
))
Example data for a patient:
final %>% filter(PX_ID == 531687) %>%
select(t_1, t_2, tx, dead, stat_just, six_status,
over_1a, lvad_comp, elective_1A)
This patient went through the following status changes:
When the candidate is inactivated from the list, we carry forward their status from the previous observed period. Because many candidates are deactivated from list before dying, this assumption allows the model to appropriately capture the risk of each active waitlist status.
#carry forward statuses to fill inactive periods
data <- final %>%
arrange(PX_ID, t_1) %>% group_by(PX_ID) %>%
mutate_at(vars(six_status, stat_just, three_status,
over_1a, list_year,
lvad_comp, elective_1A, cf_lvad,
blood_type, age, female, bmi_low,
bmi_high, simple_diag, cross_match),
list(~na.locf(., na.rm = FALSE))) %>%
ungroup()
Example data for a patient with statuses “carried forward”
data %>% filter(PX_ID == 531687) %>%
select(t_1, t_2, tx, dead,
stat_just, six_status, over_1a,
lvad_comp, elective_1A, cf_lvad,
age, female, black,
bmi_low, bmi_high, diagnosis, cross_match)
data %>% select(PX_ID, t_1, t_2, tx, dead, stat_just, cf_lvad)
For the 198 recipients with only one observation, assign them status three for 1A, four for 1B, and six for 2.
data <- data %>%
mutate(
six_status = case_when(
tx ==1 & is.na(six_status) & three_status == "Status 1A" ~ 3,
tx ==1 & is.na(six_status) & three_status == "Status 1B" ~ 4,
tx ==1 & is.na(six_status) & three_status == "Status 2" ~ 6,
TRUE ~ six_status
)
)
#dummy code statuses
data <- data %>%
mutate(
stat_1a = ifelse(three_status == "Status 1A", 1, 0),
stat_1b = ifelse(three_status =="Status 1B", 1,0),
stat_2 = ifelse(three_status == "Status 2", 1, 0),
status_1 = ifelse(six_status == 1, 1, 0),
status_2 = ifelse(six_status == 2, 1, 0),
status_3 = ifelse(six_status == 3, 1, 0),
status_4 = ifelse(six_status == 4, 1, 0),
status_6 = ifelse(six_status == 6, 1, 0)
)
to_model <- data %>%
select(PX_ID, center, OPO, t_1, t_2, tx, dead, stat_1a, stat_1b, stat_2,
status_1, status_2, status_3, status_4, status_6,
stat_just, three_status, six_status,
cf_lvad,
era_tx, tx_risky_don,
DON_BUN, DON_CREAT, DON_AGE, REC_HR_ISCH,
black, black_don,
list_year,
age, female, blood_type, bmi_low, bmi_high, simple_diag, cross_match) %>%
mutate_at(vars(cf_lvad, black, black_don, REC_HR_ISCH, DON_BUN, DON_CREAT, DON_AGE),
list(~ifelse(is.na(.)==TRUE, 0, .)))%>%
drop_na(stat_1a) ##Key filter step, removes patients who were never activated
# not run- confirm dropped patients were never activated on the waitlist
# data %>%
# group_by(PX_ID) %>%
# count(stat_just) %>%
# mutate(total_justs = sum(n)) %>%
# spread(key = stat_just, value = n) %>%
# filter(total_justs == Inactive)
center_region <- institution %>%
filter(CTR_TY %in% c("TX1", "VA1", "FTX")) %>%
select(CTR_ID, REGION) %>%
rename(center= CTR_ID)
to_model <- to_model %>% left_join(center_region, by = "center")
Column `center` has different attributes on LHS and RHS of join
#write final data set out as a csv file
write_csv(to_model, outfile)
ftable(to_model$stat_just, to_model$six_status)
1 2 3 4 6
Inactive 198 1032 2463 10001 3491
Status 1A (Exception) 23 0 4975 271 0
Status 1A (High dose inotropes) 12 0 8607 19543 0
Status 1A (MCS complication) 51 4006 28305 43 0
Status 1A (MCS for shock) 866 6585 10722 1237 0
Status 1A (Mechanical ventilation) 50 0 1036 28 1
Status 1A (no justification listed) 2 0 130 3 0
Status 1B (Exception) 0 0 0 1962 0
Status 1B (inotropes) 0 0 0 22621 0
Status 1B (No justification listed) 0 0 0 4029 0
Status 1B (stable VAD) 0 0 0 15907 0
Status 2 0 0 0 3076 11964
Note: The candidates with exceptions, high dose inotropes, or mechanical ventilation who MCS complications who were coded as Status 1 met the criteria because had a MCSD with life-threatening ventricular arrhythmia, or were supported by VA ECMO or Non-dischargeable, surgically implanted, non-endovascular bi-ventricular support device.
##Six-status system coding summary for all recipients
recips <- to_model %>% filter(tx ==1)
ftable(recips$stat_just, recips$six_status)
1 2 3 4 6
Status 1A (Exception) 17 0 610 266 0
Status 1A (High dose inotropes) 8 0 711 2634 0
Status 1A (MCS complication) 51 422 2567 40 0
Status 1A (MCS for shock) 171 832 2337 620 0
Status 1A (Mechanical ventilation) 6 0 27 17 1
Status 1A (no justification listed) 2 0 3 0 0
Status 1B (Exception) 0 0 0 502 0
Status 1B (inotropes) 0 0 0 4336 0
Status 1B (No justification listed) 0 0 0 637 0
Status 1B (stable VAD) 0 0 0 1660 0
Status 2 0 0 0 288 1050
ftable(recips$six_status, recips$three_status)
Status 1A Status 1B Status 2
1 255 0 0
2 1254 0 0
3 6255 0 0
4 3462 7250 288
6 1 0 1050
to_model %>% select(PX_ID, t_1, t_2, tx, dead, stat_just, cf_lvad)
#calculate values for flow-chart
tot_analyzed <- to_model %>% group_by(PX_ID) %>% filter(row_number()==1) %>% ungroup() %>% nrow()
miss_data <- nrow(init_list) - tot_analyzed
#missing data exclusion detail
total_exclusions <- tot_adults - tot_analyzed
##identify candidates who were never active
only_inactive <- data %>%
group_by(PX_ID) %>% summarise(mean_stat = min(status)) %>%
filter(mean_stat == 2999) %>% ungroup() %>% nrow()
##remaining candidates had erroneous dates
error_dates <- init_list %>% filter(!PX_ID %in% data$PX_ID)
error_dates <- length(unique(error_dates$PX_ID))
#outcomes
##total deaths without transplant
died_before_tx <- to_model %>%
group_by(PX_ID) %>%
filter(row_number()== n()) %>%
ungroup() %>%
filter(tx ==0 & dead ==1) %>% nrow()
##deaths while still active on list
death_on_list <- data %>%
filter(PX_ID %in% to_model$PX_ID) %>%
group_by(PX_ID) %>%
filter(row_number()==1) %>%
ungroup() %>%
filter(CAN_REM_CD.init == 8) %>%
nrow()
##deaths after delisting
died_delist <- died_before_tx - death_on_list
##transplanted
tot_tx <- recips %>% nrow()
##still waiting at end of follow-up
still_waiting <-tot_analyzed - tot_tx - died_before_tx
#Post-transplant outcomes
##dead or re-transplanted post-transplant
dead_post_tx <- recips %>% filter(dead ==1) %>% nrow()
##re-transplant
post_tx_re_tx <- data %>%
filter(PX_ID %in% to_model$PX_ID) %>%
group_by(PX_ID) %>%
filter(tx == 1) %>%
ungroup() %>%
filter(TFL_LASTATUS == "R") %>%
nrow()
##deaths
post_tx_deaths <- dead_post_tx - post_tx_re_tx
##alive post-transplant
alive_post_tx <- recips %>% filter(dead == 0) %>% nrow()
##calculate mean follow-up time for censored observations
last_ob <- to_model %>%
group_by(PX_ID) %>% arrange(t_1) %>%
filter(dead ==0 & row_number() == n()) %>%
select(PX_ID, t_2)
mean_fup_time <- comma_2(mean(last_ob$t_2)/365)
During 2006-2015, there were 30,899 adult candidates registered for heart transplantation in the US. After exclusions (Figure 1), the remaining eligible 29,199 adult candidates were listed at 113 centers and 19,815 (68%) received a heart transplant. Among heart transplant recipients, 5,389 (27%) died or were re-transplanted during the study period and 14,426 (73%) remained alive at last follow-up. Of the 9,384 candidates who did not receive a transplant, 5,669 (60%) died (2,644 while on the waitlist and 3,025 after delisting) and 3,715 (40%) were alive but had not received a transplant by the end of follow-up. Surviving patients in the cohort were followed for an average of 5.4 years before censoring.
Study population selection displayed in STrengthening the Reporting of OBservational studies in Epidemiology (STROBE) diagram format. We excluded 970 for multi-organ transplantation, 200 candidates for listing at one of 33 low volume centers, 393 candidates who were never activated on the list, and 137 candidates with obvious data entry.
library(tableone)
cand_thor <- read_sas("SAF 2018 Q3/cand_thor.sas7bdat", NULL) %>%
zap_formats() %>% zap_labels()
for_table_one <- to_model %>%
group_by(PX_ID) %>%
mutate(tx_mean = mean(tx),
got_tx = ifelse(tx_mean> 0, 1, 0)) %>%
filter(row_number()==1) %>%
ungroup() %>%
left_join(cand_thor)
Joining, by = "PX_ID"
Column `PX_ID` has different attributes on LHS and RHS of join
for_table_one <- for_table_one %>%
select(
CAN_AGE_AT_LISTING,
CAN_GENDER,
CAN_BMI,
CAN_RACE,
CAN_DGN,
CAN_ABO,
CAN_DIAB_TY,
CAN_MOST_RECENT_CREAT,
CAN_DIAL,
CAN_FUNCTN_STAT,
CAN_PCW_MEAN,
CAN_PULM_ART_MEAN,
CAN_CARDIAC_OUTPUT,
CAN_WGT_KG,
CAN_HGT_CM,
CAN_PRIMARY_PAY,
stat_just,
cf_lvad,
got_tx) %>%
mutate(Gender = factor(CAN_GENDER, levels = c("F", "M")),
Race = factor(CAN_RACE),
Race = fct_lump(Race, n = 3),
Race = fct_recode(Race,
"White" = "8",
"Black" = "16",
"Hispanic" = "2000",
"Other" = "Other"),
Diagnosis = case_when(
CAN_DGN>999 & CAN_DGN<1007 ~ "Dilated cardiomyopathy, non-ischemic",
CAN_DGN == 1007 | CAN_DGN ==1200 ~ "Ischemic cardiomyopathy",
CAN_DGN>1048 & CAN_DGN< 1100 ~ "Restrictive cardiomyopathy",
TRUE ~ "Other"
),
Diagnosis = factor(Diagnosis,
levels = c("Dilated cardiomyopathy, non-ischemic",
"Ischemic cardiomyopathy",
"Restrictive cardiomyopathy",
"Other")),
Diabetes = case_when(
CAN_DIAB_TY>1 & CAN_DIAB_TY<6 ~ "History of DM",
CAN_DIAB_TY ==1 ~ "Non-diabetic",
TRUE ~ "Unknown"
),
female_gfr = if_else(CAN_GENDER == "F", 0.742, 1),
black_gfr = if_else(Race == "Black", 1.21, 1),
eGFR = 175*((CAN_MOST_RECENT_CREAT)^(-1.154))*(CAN_AGE_AT_LISTING^(-0.203))*female_gfr*black_gfr,
Renal_Function = case_when(
CAN_DIAL == "Y" ~ "Dialysis",
eGFR >= 60 ~ "GFR >= 60 ml/min/1.73 m^2",
eGFR>= 30 ~ "GFR >= 30 & <60 ml/min/1.73 m^2",
eGFR < 30 ~ "GFR < 30 ml/min/1.73 m^2",
TRUE ~ "Unknown"
),
Renal_Function = if_else(is.na(Renal_Function)==TRUE, "Unknown", Renal_Function),
body_surface_area = 0.007184*(CAN_HGT_CM)^(0.725)*CAN_WGT_KG^(0.425),
Cardiac_Index = as.numeric(CAN_CARDIAC_OUTPUT/body_surface_area),
Functional_Status = case_when(
CAN_FUNCTN_STAT == 1 | (CAN_FUNCTN_STAT>2069) ~"Limited Impairment, 10-30%",
(CAN_FUNCTN_STAT>2039 & CAN_FUNCTN_STAT<2061) ~ "Moderate Impairment, 40-60%",
(CAN_FUNCTN_STAT>2000 & CAN_FUNCTN_STAT<2031) ~ "Severe Impairment, 70-100%",
TRUE ~ "Unknown"
),
Functional_Status = ifelse(is.na(Functional_Status), "Unknown", Functional_Status),
severe_impairment = ifelse(Functional_Status == "Severe Impairment, 70-100%", 1, 0),
acute_mcs = ifelse(stat_just == "Status 1A (MCS for shock)", 1, 0),
lvad_comp = ifelse(stat_just == "Status 1A (MCS complication)", 1, 0),
pcwp_15 = ifelse(CAN_PCW_MEAN < 15, 1, 0),
pcwp_15 = ifelse(is.na(CAN_PCW_MEAN), 0, pcwp_15),
blood_type = factor(
case_when(
CAN_ABO %in% c("A", "A1", "A2") ~ "A",
CAN_ABO %in% c("A1B", "A2B") ~ "AB",
TRUE ~ CAN_ABO)
),
payor = case_when(
CAN_PRIMARY_PAY %in% c(3,4,13) ~ "Medicare",
CAN_PRIMARY_PAY ==2 ~ "Medicaid",
CAN_PRIMARY_PAY == 1 ~ "Private",
TRUE ~ "Other"
)
)
library(tableone)
cont_vars <- c("CAN_AGE_AT_LISTING", "CAN_BMI",
"CAN_PULM_ART_MEAN", "CAN_PCW_MEAN", "Cardiac_Index")
cat_vars <- c( "stat_just", "cf_lvad",
"Gender","Race",
"Diagnosis", "Diabetes", "Renal_Function",
"Functional_Status","severe_impairment",
"acute_mcs", "lvad_comp", "pcwp_15", "blood_type", "payor")
CreateTableOne(vars=cont_vars, data = for_table_one, strata = "got_tx")
Stratified by got_tx
0 1 p test
n 9384 19815
CAN_AGE_AT_LISTING (mean (SD)) 52.35 (12.58) 52.39 (12.49) 0.768
CAN_BMI (mean (SD)) 28.35 (5.30) 27.19 (4.99) <0.001
CAN_PULM_ART_MEAN (mean (SD)) 30.27 (10.90) 29.85 (10.17) 0.002
CAN_PCW_MEAN (mean (SD)) 19.97 (8.85) 20.19 (8.73) 0.058
Cardiac_Index (mean (SD)) 2.20 (0.66) 2.16 (0.65) <0.001
cat_vars_by_tx <- print(CreateCatTable(vars = cat_vars, data = for_table_one, strata = "got_tx"))
Stratified by got_tx
0 1 p test
n 9384 19815
stat_just (%) <0.001
Status 1A (Exception) 88 ( 0.9) 264 ( 1.3)
Status 1A (High dose inotropes) 595 ( 6.3) 2021 (10.2)
Status 1A (MCS complication) 145 ( 1.5) 426 ( 2.1)
Status 1A (MCS for shock) 965 (10.3) 2394 (12.1)
Status 1A (Mechanical ventilation) 117 ( 1.2) 92 ( 0.5)
Status 1A (no justification listed) 11 ( 0.1) 11 ( 0.1)
Status 1B (Exception) 89 ( 0.9) 234 ( 1.2)
Status 1B (inotropes) 2251 (24.0) 6064 (30.6)
Status 1B (No justification listed) 0 ( 0.0) 2 ( 0.0)
Status 1B (stable VAD) 1046 (11.1) 2428 (12.3)
Status 2 4077 (43.4) 5879 (29.7)
cf_lvad = 1 (%) 1710 (18.2) 4617 (23.3) <0.001
Gender = M (%) 6946 (74.0) 14795 (74.7) 0.243
Race (%) <0.001
White 6193 (66.0) 13362 (67.4)
Black 2201 (23.5) 4046 (20.4)
Hispanic 689 ( 7.3) 1562 ( 7.9)
Other 301 ( 3.2) 845 ( 4.3)
Diagnosis (%) <0.001
Dilated cardiomyopathy, non-ischemic 3651 (38.9) 8688 (43.8)
Ischemic cardiomyopathy 3499 (37.3) 7382 (37.3)
Restrictive cardiomyopathy 907 ( 9.7) 1866 ( 9.4)
Other 1327 (14.1) 1879 ( 9.5)
Diabetes (%) <0.001
History of DM 2950 (31.4) 5442 (27.5)
Non-diabetic 6398 (68.2) 14331 (72.3)
Unknown 36 ( 0.4) 42 ( 0.2)
Renal_Function (%) <0.001
GFR < 30 ml/min/1.73 m^2 833 ( 8.9) 623 ( 3.1)
GFR >= 30 & <60 ml/min/1.73 m^2 3792 (40.4) 7811 (39.4)
GFR >= 60 ml/min/1.73 m^2 4704 (50.1) 11306 (57.1)
Unknown 55 ( 0.6) 75 ( 0.4)
Functional_Status (%) <0.001
Limited Impairment, 10-30% 3203 (34.1) 6374 (32.2)
Moderate Impairment, 40-60% 3093 (33.0) 7044 (35.5)
Severe Impairment, 70-100% 2828 (30.1) 5990 (30.2)
Unknown 260 ( 2.8) 407 ( 2.1)
severe_impairment = 1 (%) 2828 (30.1) 5990 (30.2) 0.882
acute_mcs = 1 (%) 965 (10.3) 2394 (12.1) <0.001
lvad_comp = 1 (%) 145 ( 1.5) 426 ( 2.1) 0.001
pcwp_15 = 1 (%) 2416 (25.7) 4861 (24.5) 0.026
blood_type (%) <0.001
A 3006 (32.0) 8067 (40.7)
AB 247 ( 2.6) 1098 ( 5.5)
B 1058 (11.3) 2899 (14.6)
O 5073 (54.1) 7751 (39.1)
payor (%) <0.001
Medicaid 1124 (12.0) 2333 (11.8)
Medicare 3155 (33.6) 5816 (29.4)
Other 390 ( 4.2) 868 ( 4.4)
Private 4715 (50.2) 10798 (54.5)
write.csv(cat_vars_by_tx, "cat_vars_by_tx.csv")
cont_vars_by_tx <- print(CreateContTable(vars = cont_vars, data = for_table_one, strata = "got_tx"))
Stratified by got_tx
0 1 p test
n 9384 19815
CAN_AGE_AT_LISTING (mean (SD)) 52.35 (12.58) 52.39 (12.49) 0.768
CAN_BMI (mean (SD)) 28.35 (5.30) 27.19 (4.99) <0.001
CAN_PULM_ART_MEAN (mean (SD)) 30.27 (10.90) 29.85 (10.17) 0.002
CAN_PCW_MEAN (mean (SD)) 19.97 (8.85) 20.19 (8.73) 0.058
Cardiac_Index (mean (SD)) 2.20 (0.66) 2.16 (0.65) <0.001
write.csv(cont_vars_by_tx, "cont_vars_by_tx.csv")
cat_vars_ <- print(CreateCatTable(vars = cat_vars, data = for_table_one))
Overall
n 29199
stat_just (%)
Status 1A (Exception) 352 ( 1.2)
Status 1A (High dose inotropes) 2616 ( 9.0)
Status 1A (MCS complication) 571 ( 2.0)
Status 1A (MCS for shock) 3359 (11.5)
Status 1A (Mechanical ventilation) 209 ( 0.7)
Status 1A (no justification listed) 22 ( 0.1)
Status 1B (Exception) 323 ( 1.1)
Status 1B (inotropes) 8315 (28.5)
Status 1B (No justification listed) 2 ( 0.0)
Status 1B (stable VAD) 3474 (11.9)
Status 2 9956 (34.1)
cf_lvad = 1 (%) 6327 (21.7)
Gender = M (%) 21741 (74.5)
Race (%)
White 19555 (67.0)
Black 6247 (21.4)
Hispanic 2251 ( 7.7)
Other 1146 ( 3.9)
Diagnosis (%)
Dilated cardiomyopathy, non-ischemic 12339 (42.3)
Ischemic cardiomyopathy 10881 (37.3)
Restrictive cardiomyopathy 2773 ( 9.5)
Other 3206 (11.0)
Diabetes (%)
History of DM 8392 (28.7)
Non-diabetic 20729 (71.0)
Unknown 78 ( 0.3)
Renal_Function (%)
GFR < 30 ml/min/1.73 m^2 1456 ( 5.0)
GFR >= 30 & <60 ml/min/1.73 m^2 11603 (39.7)
GFR >= 60 ml/min/1.73 m^2 16010 (54.8)
Unknown 130 ( 0.4)
Functional_Status (%)
Limited Impairment, 10-30% 9577 (32.8)
Moderate Impairment, 40-60% 10137 (34.7)
Severe Impairment, 70-100% 8818 (30.2)
Unknown 667 ( 2.3)
severe_impairment = 1 (%) 8818 (30.2)
acute_mcs = 1 (%) 3359 (11.5)
lvad_comp = 1 (%) 571 ( 2.0)
pcwp_15 = 1 (%) 7277 (24.9)
blood_type (%)
A 11073 (37.9)
AB 1345 ( 4.6)
B 3957 (13.6)
O 12824 (43.9)
payor (%)
Medicaid 3457 (11.8)
Medicare 8971 (30.7)
Other 1258 ( 4.3)
Private 15513 (53.1)
write.csv(cat_vars_, "cat_vars_.csv")
cont_vars_ <- print(CreateContTable(vars = cont_vars, data = for_table_one))
Overall
n 29199
CAN_AGE_AT_LISTING (mean (SD)) 52.38 (12.52)
CAN_BMI (mean (SD)) 27.56 (5.12)
CAN_PULM_ART_MEAN (mean (SD)) 29.98 (10.41)
CAN_PCW_MEAN (mean (SD)) 20.12 (8.77)
Cardiac_Index (mean (SD)) 2.17 (0.65)
write.csv(cont_vars_, "cont_vars_.csv")